package com.four.mapper;

import com.four.entity.Admin;
import com.four.vo.AdminVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AdminMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Admin admin);

    int insertSelective(Admin record);

    Admin selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Admin record);

    int updateByPrimaryKey(Admin admin);

    Admin selectByAccountAndPass(@Param("account") String account, @Param("password") String password);

    //检索管理员信息
    List<Admin> findByCondition();

    /**
     * 根据登录用户id查询用户个人信息
     */
   Admin selectAdminmessage(@Param("id") Integer id);

    void deleteByUserId(Integer adminId);

    void insertAdminId(@Param("adminId") Integer adminId,@Param("roleIds")Integer[] roleIds);

    int updateByPass(AdminVo adminVo);

    void deleteByAdmin(Integer id);
}